require(['../config/requireconfig'],function(config){
	//根据需要添加
	require(['zepto','common/mcommon','common/prodGen'],function($,com,prodGen){
        com.init();
		var pageLogic = new PageLogic($,com,prodGen);
		pageLogic.init();

	});
});
var PageLogic = function($,com,prodGen){
	
	return{
		init:function(){
			var _this =this;
			_this.initData();
		},
		params:function(){
			var vehicleNo = com.utils().urlParam("vehicleNo");
			var sublineNo = com.utils().urlParam("sublineNo");
			return {
				vehicleNo:vehicleNo,
				sublineNo:sublineNo
			};
		},
		initData:function(){
			var _this =this;
			com.ajax({
				url:"/mprodTeamList1.json",
				data:_this.params(),
				success:function(res){
					_this.initNav(
						res.data.carList[0].BRAND_NAME,
						res.data.carList[0].MODEL_NAME,
						res.data.carList[0].DISPLACEMENT_L,
						res.data.SUBLINE_NAME);
					prodGen.genPartInfo(res.data.paramsList,_this.afterSelectPart);
				}
			});
		},
		initNav:function(brandName,modelName,displacementL,sublineName){
			$("#brandName").text(brandName);
			$("#modelName").text(modelName);
			$("#displacementL").text(displacementL);
			$("#sublinename").text(sublineName);
		},
		afterSelectPart:function(partNo){
			com.ajax({
				url:"/getPartNumber2.json",
				data:{vehicleNo: partNo},
				success:function(res){
					prodGen.genPrdInfo($(".prd-info"),res.data);
				}
			})
		}
	}
}